package com.appcenter.jz.Logger;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.ThreadContext;
import org.springframework.util.StringUtils;

public class JZLogger {
    private static final Logger logger = LogManager.getLogger();
    public static void Info(String message,String logType) {
        try {
            if (StringUtils.isEmpty(logType)) {
                logType = "Custom";
            }
            ThreadContext.put("LogType", logType);
            logger.info(message);
            ThreadContext.clearAll();
        } catch (Exception ex) {
            try{
                ThreadContext.clearAll();
            }catch (Exception ex1){};
        }
    }
    public static void Info(String message){

        JZLogger.Info(message,null);
    }
}
